package org.langcom.logic.order;

import java.math.BigDecimal;

import org.langcom.logic.automata.LongData;

public class Order extends LongData {

	private static final long serialVersionUID = 2070331283800534962L;
	private String number, message;
	private Long personId, proposalId, discountId, currencyId;
	private BigDecimal quantity, total;
	private Boolean issuerConfirm = false, contractorConfirm = false, rejectedByIssuer = true;
	private OrderState state = OrderState.NEW;

	public Order() {
	}

	public Order(Long personId, Long proposalId) {
		this.personId = personId;
		this.proposalId = proposalId;
	}

	String getNumber() {
		return number;
	}

	synchronized final void setNumber(String number) {
		this.number = number;
	}

	synchronized final String getMessage() {
		return message;
	}

	synchronized final void setMessage(String message) {
		this.message = message;
	}

	synchronized final Long getPersonId() {
		return personId;
	}

	synchronized final void setPersonId(Long personId) {
		this.personId = personId;
	}

	synchronized final Long getProposalId() {
		return proposalId;
	}

	synchronized final void setProposalId(Long proposalId) {
		this.proposalId = proposalId;
	}

	synchronized final Long getDiscountId() {
		return discountId;
	}

	synchronized final void setDiscountId(Long discountId) {
		this.discountId = discountId;
	}

	synchronized final Long getCurrencyId() {
		return currencyId;
	}

	synchronized final void setCurrencyId(Long currencyId) {
		this.currencyId = currencyId;
	}

	synchronized final BigDecimal getQuantity() {
		return quantity;
	}

	synchronized final void setQuantity(BigDecimal quantity) {
		this.quantity = quantity;
	}

	synchronized final BigDecimal getTotal() {
		return total;
	}

	synchronized final void setTotal(BigDecimal total) {
		this.total = total;
	}

	synchronized final OrderState getState() {
		return state;
	}

	synchronized final void setState(OrderState state) {
		this.state = state;
	}

	synchronized final Boolean getIssuerConfirm() {
		return issuerConfirm;
	}

	synchronized final void setIssuerConfirm(Boolean issuerConfirm) {
		this.issuerConfirm = issuerConfirm;
	}

	synchronized final Boolean getContractorConfirm() {
		return contractorConfirm;
	}

	synchronized final void setContractorConfirm(Boolean contractorConfirm) {
		this.contractorConfirm = contractorConfirm;
	}

	synchronized final Boolean getRejectedByIssuer() {
		return rejectedByIssuer;
	}

	synchronized final void setRejectedByIssuer(Boolean rejectedByIssuer) {
		this.rejectedByIssuer = rejectedByIssuer;
	}
}
